ported by walyngg https://discord.gg/JHGfxptjTc